<!doctype html>
<html>
<head>
<meta charset="utf-8">
<TITLE>论坛</TITLE>
<Link rel="stylesheet" type="text/css" href="style/style.css" />
	<Link rel="stylesheet" type="text/css" href="style/index.css" />
	<script src="http://47.106.66.89:8080/js/vue.min.js"></script>
	<script src="http://47.106.66.89:8080/js/axios.min.js"></script>
	<link href="http://47.106.66.89:8080/js/ele-2.15.7/theme-chalk/index.css" rel="stylesheet">
	<script src="http://47.106.66.89:8080/js/ele-2.15.7/index.js"></script>
	<script src="js/bbs.js"></script>

</HEAD>

<BODY>
<div id="app">
	<bbs>
		<!--      主体        -->
				<DIV class="t left">
					<TABLE cellSpacing="0" cellPadding="0" width="100%">
						<TR class="tr2" align="center">
							<TD colSpan="2">论坛</TD>
							<TD style="WIDTH: 10%;">主题</TD>
							<TD style="WIDTH: 30%">最后发表</TD>
						</TR>
						<!--       主版块       -->

						<template v-for="b in boards">
							<TR class="tr3">
								<TD colspan="4">{{b.boardname}}</TD>
							</TR>
							<!--       子版块       -->

							<TR class="tr3" v-for="sub in b.children">
								<TD width="5%">&nbsp;</TD>
								<TH align="left">
									<IMG src="image/board.gif">
									<A :href="'list.html?bid='+sub.id">{{sub.boardname}}</A>
								</TH>
								<TD align="center">{{sub.topicCnt}}</TD>
								<TH>
				<SPAN>
					<A href="detail.html">{{sub.maxTopic ? sub.maxTopic.title : ''}}</A>
				</SPAN>
									<BR/>
									<SPAN>{{sub.maxTopic ? sub.maxTopic.user.cname : ''}}</SPAN>
									<SPAN class="gray">[ {{sub.maxTopic ? sub.maxTopic.publishtime : ''}} ]</SPAN>
								</TH>
							</TR>
						</template>
					</TABLE>
				</DIV>
				<div class="right" style="background-color: #2f5fa1">

				</div>
		        <span></span>
	</bbs>
</div>
</BODY>
<script>
	var v = new Vue({
		el:"#app",
		data:{
			boards:{}
		},
		created() {
			axios.get("board/query").then(res=>{
				this.boards = res.data;
			})
		},
		methods : {

		}
	})
</script>
</HTML>
